module.exports = {
	/**
	 * 代理商等级添加
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: 'ok' };
		// 业务逻辑开始-----------------------------------------------------------
		// 获取前端传过来的参数
		let {
			agent_name,
			agent_value,
			commission_rate,
			remark,
			status
		} = data;
		// 参数验证开始
		
		
		// 参数验证结束
		let dbName = "a_agent_grade"; // 表名
		// 执行 数据库add 命令
		res.id = await vk.baseDao.add({
			dbName,
			dataJson: {
				agent_name,
				agent_value,
				commission_rate,
				remark,
				status
			}
		});
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
